package com.sk.bilibili.model.activity;

import com.sk.api.annotations.Autowired;
import com.sk.bilibili.mapper.TypeMapper;
import com.sk.bilibili.model.BaseModel;
import com.sk.bilibili.model.BaseRefreshModel;
import com.sk.bilibili.utils.RequestUtils;
import com.sk.bilibili.view.activity.RankActivity;

public class RankModel extends BaseModel<RankActivity> {

    @Autowired
    TypeMapper typeMapper;

    @Override
    public void loadData() {
        RequestUtils.process(typeMapper.getAll(), types -> {
            types.remove(0);
            view.loadTypeSuccess(types);
        });
    }

}